<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8"/>
	<title>汽车保养与维修系统</title>
	<link href="<?php echo base_url('web');?>/css/bootstrap.min.css" rel="stylesheet" />
	<script src="<?php echo base_url('web')?>/js/jquery-3.2.0.min.js" ></script>
	<script src="<?php echo base_url('web')?>/js/bootstrap.min.js" ></script>
</head>
<body style="padding:100px;">
	<div class="panel panel-default">
		<!-- Default panel contents -->
		<div class="panel-heading"><h1><?php echo $title['name'];?></h1></div>

		<!-- Table -->
		<table class="table">
			<style>
				.table {text-align:center;}
				.table th {text-align:center;}
			</style>
			<thead>
				<tr>
					<th>顺序</th>
					<th>标题</th>
					<th>查看</th>
				</tr>
			</thead>
			<style>
				tbody label {padding:0 5px; background: #f55;border-radius: 4px;}
				
			</style>
			<tbody>
				<?php 
					$str = '';
					foreach($list as $k=>$v){
						$str .= '<tr>';
						$discount = $v['discount']==10?'':"<label>今日{$v['discount']}折优惠</label>";
						$str .= '<td style="vertical-align:middle;" class="id">'.($k+1).'</td>'; 
						$str .= '<td style="vertical-align:middle;">'.$v['title'].$discount.'</td>';
						$str .= '<td style="vertical-align:middle;"><a href="'.base_url('index.php/server/serverInfo/'.$v['id']).'" type="button" class="btn btn-default wq-btn">查看</a></td>';
						$str .= '</tr>';
					}
					echo $str;
				?>
			</tbody>
		</table>
	</div>
</body>
</html>